package p2p.controller.events
{
	import flash.events.Event;
	import flash.net.FileReference;
	
	import p2p.model.vo.DescriptorVO;
	
	public class FileSharingEvent extends Event
	{
		public static const BROWSE_FILE_SYSTEM:String = "browseFileSystem";
		public static const FILE_SENT:String = "fileSent";
		public static const FILE_RECEIVED:String = "fileReceived";
		public static const FILE_RECEIVING:String = "fileReceiving";
		public static const SAVE_FILE:String = "saveFile";
		public static const FILE_SAVED:String = "fileSaved";
		public static const FAULT:String = "fault";
		
		
		public var fileDescriptor:DescriptorVO;
		public var fr:FileReference;
		
		public function FileSharingEvent(type:String, fileDescriptor:DescriptorVO = null, fr:FileReference = null, bubbles:Boolean=true, cancelable:Boolean=false)
		{
			super(type, bubbles, cancelable);
			this.fileDescriptor = fileDescriptor;
			this.fr = fr;
		}
		
		override public function clone() : Event
		{
			return new FileSharingEvent(type, fileDescriptor, fr, bubbles, cancelable);
		}
	}
}